import request from '@/utils/request'

// 查询列表
export function listImg(query) {
  return request({
    url: '/system/sample/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getImg(imgId) {
  return request({
    url: '/system/sample/' + imgId,
    method: 'get'
  })
}


// 新增
export function addIdentify(data) {
  return request({
    url: '/system/sample/add',
    method: 'post',
    data: data
  })
}
// 修改
export function updateIdentify(data) {
  return request({
    url: '/system/sample/edit',
    method: 'post',
    data: data
  })
}
// 删除
export function delIdentify(identifyId) {
  return request({
    url: '/system/sample/remove/' + identifyId,
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST'
  })
}

// 导出
// export function exportImg(query) {
//   return request({
//     url: '/system/sample/export',
//     method: 'post',
//     params: query
//   })
// }
// 导出示例库
export function exportImg(data) {
  return request({
    url: '/system/sample/export',
    method: 'post',
    params: data,
    // responseType: 'blob',
  })
}
//下载文件
export function downLoadIdentify(data) {
  return request({
    url: '/system/sample/downLoad',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    //  responseType: 'blob',
    params: data
  })
}
//下载缩略图
export function downLoadThumbnailImg(data) {
  return request({
    url: '/system/sample/downLoadImg',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    //  responseType: 'blob',
    params: data
  })
}

